package com.consumer.user.controller;

import com.common.consumer.controller.AbstractConsumerGenericController;
import com.common.consumer.service.ConsumerGenericService;
import com.consumer.user.service.ConsumerDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;


/**
 * 类描述：数据字典的消费者controller
 *
 * @author linzf
 */
@RestController
@RequestMapping("/dict")
public class ConsumerDictController extends AbstractConsumerGenericController {

    @Autowired
    private ConsumerDictService consumerDictService;

    @Override
    protected ConsumerGenericService getService() {
        return this.consumerDictService;
    }

    /**
     * 功能描述：更新数据字典状态
     * @param entity
     * @return
     */
    @PostMapping("operateDict")
    public Map<String,Object> operateDict(@RequestBody Map<String,Object> entity){
        return consumerDictService.operateDict(entity);
    }

}
